package com.xx.pmis.services.implementations;

import java.util.List;

import com.xx.pmis.model.Lucky;
import com.xx.pmis.persistence.dao.LuckyDAO;
import com.xx.pmis.services.LuckyService;

public class LuckyServiceImpl implements LuckyService {
	LuckyDAO luckyDAO = null;

	public LuckyServiceImpl(LuckyDAO luckyDAO) {
		super();
		this.luckyDAO = luckyDAO;
	}

	public void saveOrUpdateLucky(Lucky lucky) throws Exception {
		luckyDAO.saveOrUpdate(lucky);
	}

	public void saveLucky(Lucky lucky) throws Exception {
		luckyDAO.save(lucky);
	}

	public void deleteLucky(Lucky lucky) throws Exception {
		luckyDAO.delete(lucky);
	}

	public Lucky getLuckyByLuckyID(String luckyID) throws Exception {
		Lucky lucky = luckyDAO.getLuckyByLuckyID(luckyID);
		return lucky;
	}

	public List<Lucky> getAllLucky() throws Exception {
		List<Lucky> luckys = luckyDAO.getAllLucky();
		return luckys;
	}

	public Lucky getLuckyByIssueNumber(String issueNumber) throws Exception {
		Lucky lucky = luckyDAO.getLuckyByIssueNumber(issueNumber);
		return lucky;
	}

}
